package com.partners.dao.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author liangyongle
 * @date 2019-01-10
 */
@Data
public class ExchangeInputDTO {

    @NotNull(message = "用户id不能为空")
    private Integer uid;

    @NotNull(message = "奖品id不能为空")
    @JsonProperty(value = "product_id")
    private Integer productId;

    @NotNull(message = "兑换类型不能为空")
    @Max(value=1,message = "类型只能为0和1")
    @Min(value=0,message = "类型只能为0和1")
    private Integer type;

    @NotNull(message = "收货人姓名不能为空")
    private String name;

    @NotNull(message = "手机号码不能为空")
    private Long phone;

    private String address;





}
